package game.gameobject.character;

import com.jme3.export.InputCapsule;
import com.jme3.export.JmeExporter;
import com.jme3.export.JmeImporter;
import com.jme3.export.OutputCapsule;
import com.jme3.export.Savable;
import java.io.IOException;

public class CharacterStatus implements Savable {
    protected int hitPoints;

    public Integer getHitPoints() {
	return hitPoints;
    }

    public void setHitPoints(int hitPoints) {
	this.hitPoints = hitPoints;
    }

    public void write(JmeExporter ex) throws IOException {
	OutputCapsule capsule = ex.getCapsule(this);
	capsule.write(hitPoints, "hitPoints", 100);
    }

    public void read(JmeImporter im) throws IOException {
	InputCapsule capsule = im.getCapsule(this);
	hitPoints = capsule.readInt("hitPoints", 100);
    }
}
